<?php
declare (strict_types=1);

namespace app\model\home;

use app\common\model\BaseModel;
use \libs\Log;

class Test extends BaseModel
{
    protected $pk = 'id';

    protected function initialize()
    {
        parent::initialize();
    }

    /**
     * 添加
     * @param array $data
     * @return array
     */
    public function add(array $data)
    {
        Log::info('add in parameter', $data);

        // 6.0自动过滤非数据表字段
        self::create($data);
        return $this->returnSucc('添加成功');
    }
}
